FROM registry:5000/centos-7-java-8:v1

# ADD https://archive.apache.org/dist/hadoop/common/hadoop-2.7.2/hadoop-2.7.2.tar.gz ///
ADD hadoop-2.7.2.tar.gz ///
ADD etc/hadoop/* /hadoop-2.7.2/etc/hadoop/
ADD hadoop.sh /etc/profile.d/

ADD tini entrypoint.sh wait-and-kill.sh ///

ENV HADOOP_HOME=/hadoop-2.7.2
ENV HADOOP_CONF_DIR=/hadoop-2.7.2/etc/hadoop
ENV YARN_CONF_DIR=/hadoop-2.7.2/etc/hadoop
ENV PATH=$PATH:$HADOOP_HOME/bin

ENTRYPOINT ["/tini", "-g", "--"]
CMD ["/entrypoint.sh"]

